#!/usr/bin/env python

from google.appengine.ext import webapp
from google.appengine.ext.webapp.util import run_wsgi_app
#import modules.data
#import modules.pm25
import logging

#locations = ['Haidian Wanliu','Beijing','Changzhou', 'Shanghai'] 

class MainPage(webapp.RequestHandler):
    def get(self):

        self.response.headers['Content-Type'] = 'text/html'

#        modules.data.write("Locations",locations)
#
#        if modules.data.read("UpdateTime") is None:
#            modules.pm25.Update()
#
#        self.response.out.write('<p>Update time is: %s</p>' % modules.data.read("UpdateTime"))
#
#        for l in locations:
#            self.response.out.write('<p>%s: %s</p>' % (l, modules.data.read(l)))
#
#        if modules.data.read("PageUpdateTime") is not None:
#            self.response.out.write('<p>The data has been updated %s</p>' % modules.data.read("PageUpdateTime"))


application = webapp.WSGIApplication([('/', MainPage)], debug=True)

def main():
    run_wsgi_app(application)

if __name__== '__main__':
    main()


